import { createRouter, createWebHistory } from 'vue-router'

import errorRoute from "@/views/errorpages/route"
import loginsRoute from "@/views/logins/route"
import mainRoute from "@/views/mains/route"


const routes = [
  ...errorRoute,
  ...loginsRoute,
  ...mainRoute,

  {
    path: "/:pathMatch(.*)",
    redirect: {
      name: "404"
    }
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
